home *** CD-ROM | disk | FTP | other *** search
- /* SetFrom.yam - Set the from address automatically */
- /* $VER SetFrom.yam v1.0 (21.5.99) © 1999 M. Beck <mbeck@yam.ch> */
-
- /**********************************************************/
- /* */
- /* SetFrom.yam This script should be installed in the */
- /* ARexx configuration on the "Before writing a message" */
- /* selection. To use this script successfully, set up */
- /* an alias as foldername.sender - which means if your */
- /* folder is called Webring-ML, you should set up an */
- /* alias as Webring-ML.sender in your address book. For */
- /* every folder you do this on, the From: address will */
- /* be replaced with foldername.sender (Webring-ML.sender) */
- /* */
- /* This is really useful if you have a single account */
- /* with multiple addresses eg, Dave <fish@pseudo.a.com>, */
- /* Grandad <oldman@pseudo.a.com>. If you have this type */
- /* of account, it makes mailinglist filtering foolproof, */
- /* since you can always send from eg, jokeML@pseudo.a.com */
- /* and you can ALWAYS filter successfully by matching */
- /* "X-RCPT: jokeML". */
- /* */
- /* To actually use this script (transparently), you must */
- /* be in the correct folder when you reply/write/forward */
- /* your message eg, in our example you must have the */
- /* "Webring-ML" folder selected for the From: address to */
- /* be set to Webring-ML.sender (this is the alias meaning */
- /* "Your Name <Webring-ML@pseudo.a.com>"). */
- /* */
- /* Original non-functional script by Glen Shannon */
- /* <glen@dryad.clara.net> re-written to actually work by */
- /* Marcel Beck <mbeck@yam.ch>. LONG LIVE YAM !!!!! */
- /* */
- /**********************************************************/
-
-
- OPTIONS RESULTS
- ADDRESS YAM
- FOLDERINFO STEM folder. /* get current folder */
- fromalias = folder.name'.sender' /* alias to look for is foldername.sender */
- OPTIONS FAILAT 11 /* ignore possible error from ADDRINFO */
- ADDRINFO fromalias /* sets RC=10 if alias doesn't exist */
- IF RC = 0 THEN WRITEFROM fromalias /* if alias exists, put it in the from field */
- EXIT
-
-